from ext import Blueprint
from config import get_config

config = get_config()
url_prefix = f"/{config.API_VERSION}/{config.APP_NAME}"

current_app = None
blog_route = Blueprint('blog', __name__, url_prefix=url_prefix)


class MyRoutes:
    def init_app(self, app):
        global current_app
        current_app = app

        import routes
        current_app.register_blueprint(blog_route)

        return self
